<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GTcpConnection</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="highlevel-socket.html" title="Highlevel network functionallity">
<link rel="prev" href="GUnixConnection.html" title="GUnixConnection">
<link rel="next" href="GTcpWrapperConnection.html" title="GTcpWrapperConnection">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GUnixConnection.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="highlevel-socket.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="GTcpWrapperConnection.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GTcpConnection.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GTcpConnection.description" class="shortcut">Description</a>
                   | 
                  <a href="#GTcpConnection.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GTcpConnection.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="GTcpConnection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GTcpConnection.top_of_page"></a>GTcpConnection</span></h2>
<p>GTcpConnection — A TCP GSocketConnection</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GTcpConnection.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="GTcpConnection.html#GTcpConnection-struct" title="GTcpConnection">GTcpConnection</a>;
<span class="returnvalue">void</span>                <a class="link" href="GTcpConnection.html#g-tcp-connection-set-graceful-disconnect" title="g_tcp_connection_set_graceful_disconnect ()">g_tcp_connection_set_graceful_disconnect</a>
                                                        (<em class="parameter"><code><a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> graceful_disconnect</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GTcpConnection.html#g-tcp-connection-get-graceful-disconnect" title="g_tcp_connection_get_graceful_disconnect ()">g_tcp_connection_get_graceful_disconnect</a>
                                                        (<em class="parameter"><code><a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a> *connection</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GTcpConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----<a class="link" href="GIOStream.html" title="GIOStream">GIOStream</a>
         +----<a class="link" href="GSocketConnection.html" title="GSocketConnection">GSocketConnection</a>
               +----GTcpConnection
                     +----<a class="link" href="GTcpWrapperConnection.html" title="GTcpWrapperConnection">GTcpWrapperConnection</a>
</pre>
</div>
<div class="refsect1">
<a name="GTcpConnection.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GTcpConnection.html#GTcpConnection--graceful-disconnect" title='The "graceful-disconnect" property'>graceful-disconnect</a>"      <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="GTcpConnection.description"></a><h2>Description</h2>
<p>
This is the subclass of <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> that is created
for TCP/IP sockets.
</p>
</div>
<div class="refsect1">
<a name="GTcpConnection.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GTcpConnection-struct"></a><h3>GTcpConnection</h3>
<pre class="programlisting">typedef struct _GTcpConnection GTcpConnection;</pre>
<p>
A <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> for TCP/IP connections.
</p>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-tcp-connection-set-graceful-disconnect"></a><h3>g_tcp_connection_set_graceful_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_tcp_connection_set_graceful_disconnect
                                                        (<em class="parameter"><code><a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> graceful_disconnect</code></em>);</pre>
<p>
This enabled graceful disconnects on close. A graceful disconnect
means that we signal the receiving end that the connection is terminated
and wait for it to close the connection before closing the connection.
</p>
<p>
A graceful disconnect means that we can be sure that we successfully sent
all the outstanding data to the other end, or get an error reported.
However, it also means we have to wait for all the data to reach the
other side and for it to acknowledge this by closing the socket, which may
take a while. For this reason it is disabled by default.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>a <a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>graceful_disconnect</code></em> :</span></p></td>
<td>Whether to do graceful disconnects or not</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-tcp-connection-get-graceful-disconnect"></a><h3>g_tcp_connection_get_graceful_disconnect ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_tcp_connection_get_graceful_disconnect
                                                        (<em class="parameter"><code><a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a> *connection</code></em>);</pre>
<p>
Checks if graceful disconnects are used. See
<a class="link" href="GTcpConnection.html#g-tcp-connection-set-graceful-disconnect" title="g_tcp_connection_set_graceful_disconnect ()"><code class="function">g_tcp_connection_set_graceful_disconnect()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>a <a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if graceful disconnect is used on close, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
</div>
<div class="refsect1">
<a name="GTcpConnection.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GTcpConnection--graceful-disconnect"></a><h3>The <code class="literal">"graceful-disconnect"</code> property</h3>
<pre class="programlisting">  "graceful-disconnect"      <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
<p>Whether or not close does a graceful disconnect.</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="GTcpConnection.see-also"></a><h2>See Also</h2>
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>.
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>